#include "TcpServer.hpp"
#include "CommandExec.hpp"
#include <memory>

int main()
{
    std::shared_ptr<Command> cmd_ptr = std::make_shared<Command>();
    std::unique_ptr<TcpServer> ser_ptr = std::make_unique<TcpServer>([&cmd_ptr](std::string cmdstr)
                                                                     { return cmd_ptr->Excute(cmdstr); });

    ser_ptr->InitServer();

    ser_ptr->Start();

    ser_ptr->~TcpServer();

    return 0;
}